package com.gitee.sparta.core.property;


import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.Duration;

/**
 * 线程相关配置
 *
 * @author zyred
 * @since v 0.0.1
 */
@Setter
@Getter
public class ThreadsProperties implements Serializable {
    private static final long serialVersionUID = 9106610589351155836L;

    /** 监听器临时线程最大存活时间 **/
    private Duration keepAliveTime = Duration.ZERO;
    /** 监听器线程池阻塞队列 {@see com.zyred.queue.core.enums.ThreadPoolBlockQueueEnum}**/
    private String blockQueue = "default";
    /** 监听器线程池线程工厂 {@see com.zyred.queue.core.enums.ThreadPoolThreadFactoryEnum} **/
    private String threadFactory = "default";
    /** 监听器线程池线程名称 **/
    private String threadName = "listener";
    /** 线程池的大小，默认是根据 2NCPU 核心数来的 **/
    private Integer coreSize = null;
}
